package com.fx.util;

import javax.servlet.http.HttpServletRequest;

/**
 * @Auther: EDZ
 * @Date: 2018-7-9 10:28:
 * @Email: 你的邮箱
 * 概要说明：该类干嘛用的
 **/
public class UrlUtil {

    public static String getServerUrl(HttpServletRequest request){
        String schema = request.getScheme();
        String serverName = request.getServerName();
        String contentPath = request.getContextPath();
        return schema + "://" + serverName + contentPath;
    }
}
